/**将日期格式化为 YYYY-MM-DD hh-mm-ss的格式 */
export function parseTime(date) {
  let Year = date.getFullYear()
  let Mon = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
  let Day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
  let Hour = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
  let Min = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
  let Sec = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
  const newDate = Year + '-' + Mon + '-' + Day + ' ' + Hour + ':' + Min + ':' + Sec
  return newDate
}
